const router = new (require("../proto/Router"))();
var handler = require("../api/user");

router
  .get("/", function (req, res, next) {
    res.send("测试路由接口成功");
  })
  .descri(
    "<h3>测试路由接口</h3><div>没有token就会报错！成功则显示 测试路由接口成功</div>"
  );

// router.post('/getinfor', function (req, res, next) {
//     handler.getinfor(req, res, next);
// }).descri('<h3>描述</h3><div>获取用户信息</div>');

router
  .get("/getChathistory", function (req, res, next) {
    handler.getChathistory(req, res, next);
  })
  .descri("<h3>描述</h3><div>获取聊天记录</div>");

router
  .post("/newChat", function (req, res, next) {
    handler.newChat(req, res, next);
  })
  .descri("<h3>描述</h3><div>新增一条聊天记录</div>");

module.exports = router;
